package com.wuhuahe.luanfeng.netty.example.rpc;

import org.springframework.stereotype.Service;

/**
 * Created By wuhuahe
 * author:游龙
 * Date: 2018-07-14
 * Time: 16:53
 * Desc:
 */
@RpcClass(DemoService.class)
@Service
public class DemoServiceImpl implements DemoService {

    @Override
    public String hello(String name) {
        return "Hello! " + name;
    }

    @Override
    public String hello(String msg, String name) {
        return msg + name;
    }

    @Override
    public Pojo test(Pojo pojo) {
        pojo.setId(-pojo.getId());
        pojo.setName(pojo.getName().toUpperCase());
        pojo.setMan(!pojo.getMan());
        pojo.getList().add("last");
        return pojo;
    }
}
